﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Administrator/Views/Shared/AdminMasterPage.master" Inherits="System.Web.Mvc.ViewPage<easyccms.WebUI.Areas.Administrator.Models.UserGroupListModel>" %>
<%@ Import Namespace="easyccms.BusinessLayer.Entities" %>


<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

      <div class="page-title ui-widget-content ui-corner-all">
        <div class="float-right">
        <%= Html.ActionLink("Add new","Create") %>      
        </div>
        <h1>
        
            <b>User groups</b></h1>
        <div class="other">
            <div class="hastable">
                <table id="Table1">
                    <thead>
                        <tr>
                            <th>
                                #
                            </th>
                            <th>
                               Group name
                            </th>
                            <th>
                                Enabled
                            </th>
                            <th>
                            Created</th>                            
                            <th>
                                ID
                            </th>
                            <th style="width: 100px">
                                Options
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <%
                            int i = 0;
                        %>
                        <% foreach (UserGroup item in Model.UserGroups)
                           {
                        %>
                        <tr <%= (i/2==0)?"class=\"even\"":"class=\"odd\"" %>>
                            <td>
                                <%= i++ %>
                            </td>                            
                            <td>
                                <%= item.GroupName %>
                            </td>

                            <td><%= item.Enabled %></td>
                            <td>
                                <%= ((DateTime)item.Created).ToShortDateString()%>
                            </td>
                            <td>
                                <%= item.UserGroupId %>
                            </td>
                            <td>
                                <%: Html.ActionLink("Edit", "Edit", new { id = item.UserGroupId })%>
                                |
                                <%: Html.ActionLink("Delete", "Delete", new { id = item.UserGroupId })%>
                            </td>
                        </tr>
                        <% } %>
                    </tbody>
                </table>
            </div>
            <div class="clearfix">
            </div>
        </div>
    </div>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="JavaScriptHolder" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
</asp:Content>

